#include "about.h"
#include "ui_about.h"
#include<QPainter>
#include "mypushbutton.h"
#include<QTimer>
#include<QDebug>
about::about(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::about)
{
    ui->setupUi(this);
    this->setFixedSize(500,800);//设置固定大小
    this->setWindowTitle("飞机大战");//设置标题
    MyPushButton *backbtn=new MyPushButton("D:\\qt\\feijidazhan\\sucai\\fanhui1","D:\\qt\\feijidazhan\\sucai\\fanhui2");
    backbtn->setParent(this);
    backbtn->move(this->width()-backbtn->width()-5,this->height()-backbtn->height()-5);//第一个参数目的是把按钮放到屏幕宽度一半的地方
   // w=new Widget;
    connect(backbtn,&MyPushButton::clicked,[=](){
        emit this->chooseback();
    });
}

about::~about()
{
    delete ui;
}
void about::paintEvent(QPaintEvent *)
{
    QPainter painter(this);
    QPixmap pix;
    pix.load(":/sucai/skypay_bg.png");
    painter.drawPixmap(0,0,this->width(),this->height(),pix);//中间两个参数可以将背景图拉伸占满整个屏幕
}
